package com.cmdi.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cmdi.domain.SysPrivilege;
import com.cmdi.mapper.SysPrivilegeMapper;
import com.cmdi.service.SysPrivilegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, SysPrivilege> implements SysPrivilegeService{

    @Autowired
    private SysPrivilegeMapper sysPrivilegeMapper;

    @Override
    @DS("master") //可不加默认是master
    public Page<SysPrivilege> queryPrivilege(Page<SysPrivilege> page, int id) {
        Page<SysPrivilege> privilege = sysPrivilegeMapper.queryPrivilege(page, id);
        return privilege;
    }
}
